#ifndef MAX485_DRIVER_H
#define MAX485_DRIVER_H

#include "usart_driver.h"
#include "stdint.h"
#include "gpio_driver.h"
#include "hc595_driver.h"
#include "systick.h"

#define MAX485A_RECV          (rs485_recv_A(),rs485_ch_A())       
#define MAX485A_SEND          (rs485_send_A(),rs485_ch_A())
#define MAX485B_RECV          (rs485_recv_B(),rs485_ch_B())      
#define MAX485B_SEND          (rs485_send_B(),rs485_ch_B())

void max485_init(u32 baudrate);
void max485A_send(u8 *data_buf,u16 data_len);
void max485B_send(u8* data_buf, u16 data_len);
void max485_set_dir(uint8_t ch, uint8_t dir);


#endif
